Get device when we find it - fixes refcount leak and is correct.
authorcl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Thu, 18 Aug 2005 19:06:51 +0000 (19:06 +0000)
committercl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Thu, 18 Aug 2005 19:06:51 +0000 (19:06 +0000)
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c

index 3a37014c0b6fb470d615a8fa92021f87fcd259fc..cd4d3d97ef7c1ef13e96a4704f2042e31d11bd31 100644 (file)
@@ -242,6 +242,7 @@ static int cmp_dev(struct device *dev, void *data)
 
        if (streq(xendev->nodename, info->nodename)) {
                info->dev = xendev;
+               get_device(dev);
                return 1;
        }
        return 0;